<template>
  <div class="not-found-container">
    <div class="not-found-content">
      <!-- 404数字动画效果 -->
      <div class="number-container">
        <span class="number">4</span>
        <div class="zero">
          <div class="inner">0</div>
        </div>
        <span class="number">4</span>
      </div>
      
      <h2 class="not-found-message">抱歉，您访问的页面不存在</h2>
      <p class="description">该页面可能已被移除，或者您输入了错误的地址</p>
      
      <!-- 返回首页按钮 -->
      <el-button type="primary" @click="goHome" class="go-home-btn">
        <el-icon><home-filled /></el-icon>
        返回首页
      </el-button>
      
      <!-- 装饰元素 -->
      <div class="decor-1"></div>
      <div class="decor-2"></div>
      <div class="decor-3"></div>
    </div>
  </div>
</template>

<script setup>
import { HomeFilled } from '@element-plus/icons-vue'
import { useRouter } from 'vue-router'

const router = useRouter()

// 返回首页方法
const goHome = () => {
  router.push('/')
}
</script>

<style scoped>
/* 全局容器 */
.not-found-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
  font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
  overflow: hidden;
  position: relative;
}

/* 主内容区域 */
.not-found-content {
  text-align: center;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 80px 40px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  max-width: 600px;
  width: 100%;
  position: relative;
  z-index: 1;
  transition: all 0.5s ease;
}

.not-found-content:hover {
  transform: translateY(-5px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

/* 404数字样式 */
.number-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 30px;
  gap: 10px;
}

.number {
  font-size: 120px;
  font-weight: 800;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  animation: fadeInUp 0.6s ease-out;
}

/* 0的特殊动画效果 */
.zero {
  width: 120px;
  height: 120px;
  position: relative;
  animation: rotateZero 2s ease-in-out infinite;
}

.zero .inner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  font-size: 120px;
  font-weight: 800;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 错误信息样式 */
.not-found-message {
  font-size: 24px;
  color: #333;
  margin: 0 0 15px;
  font-weight: 600;
  animation: fadeIn 0.8s ease-out;
}

.description {
  font-size: 16px;
  color: #666;
  margin: 0 0 40px;
  line-height: 1.6;
  animation: fadeIn 1s ease-out;
}

/* 按钮样式 */
.go-home-btn {
  font-size: 16px;
  padding: 12px 32px;
  border-radius: 50px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  transition: all 0.3s ease;
  animation: fadeInUp 1.2s ease-out;
}

.go-home-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
  background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

/* 装饰元素 */
.decor-1,
.decor-2,
.decor-3 {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  z-index: 0;
}

.decor-1 {
  width: 300px;
  height: 300px;
  top: -150px;
  right: -150px;
  animation: float 8s ease-in-out infinite;
}

.decor-2 {
  width: 200px;
  height: 200px;
  bottom: -100px;
  left: -100px;
  animation: float 10s ease-in-out infinite reverse;
}

.decor-3 {
  width: 150px;
  height: 150px;
  top: 50%;
  left: -75px;
  transform: translateY(-50%);
  animation: float 12s ease-in-out infinite;
}

/* 动画效果 */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes rotateZero {
  0%, 100% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(10deg);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* 响应式设计 */
@media (max-width: 768px) {
  .not-found-content {
    padding: 60px 30px;
  }
  
  .number {
    font-size: 80px;
  }
  
  .zero {
    width: 80px;
    height: 80px;
  }
  
  .zero .inner {
    font-size: 80px;
  }
  
  .not-found-message {
    font-size: 20px;
  }
  
  .description {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .not-found-content {
    padding: 40px 20px;
    margin: 20px;
  }
  
  .number {
    font-size: 60px;
  }
  
  .zero {
    width: 60px;
    height: 60px;
  }
  
  .zero .inner {
    font-size: 60px;
  }
  
  .not-found-message {
    font-size: 18px;
  }
  
  .go-home-btn {
    width: 100%;
  }
  
  .decor-1 {
    width: 200px;
    height: 200px;
    top: -100px;
    right: -100px;
  }
  
  .decor-2 {
    width: 150px;
    height: 150px;
    bottom: -75px;
    left: -75px;
  }
  
  .decor-3 {
    width: 100px;
    height: 100px;
    left: -50px;
  }
}
</style>